package cn.com.lei.du.controller;

import org.apache.commons.lang.time.DateUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/config")
public class ConfigController {

    @Value("${user.name}")
    private String userName;

    @GetMapping("/getUserName")
    public Object getUserName(){
        Map<String, Object> map = new HashMap<>();
        map.put("name", userName);
        return map;
    }
}
